<me:UIEKK x:Class="WPFExcelReport.TEK04"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"   
                    xmlns:LS="clr-namespace:WPFExcelReport;assembly=TLIEFDAT"  
                    xmlns:LD="clr-namespace:WPFExcelReport;assembly=TLIEFKO"  
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:HR="clr-namespace:WPFExcelReport;assembly=THRSTAMM" 
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                     xmlns:VL="clr-namespace:WPFExcelReport;assembly=TVERSART"   
                    xmlns:EKD="clr-namespace:WPFExcelReport;assembly=TEKADR"   
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIEKK.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000 x:Key="dw"/>
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIEKK.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <!--Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions-->
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="2*"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <Button  Grid.Column="0"   Click="ManageCommand" Width="24" Height="20" Visibility="Collapsed" >
            <Button.Background>
                <ImageBrush  ImageSource="/ImagePackage;component/Images/Extend.png" />
            </Button.Background>
        </Button>

        <EKD:TEK08  Margin="10,0,0,0"  Visibility="Collapsed"
                                  IsAuto="True" 
                                  VerticalAlignment="Top"
                                  ORDERNUM="{Binding AUF,ElementName=TV}"  
                                  IsEdit="{Binding IsEdit,ElementName=TV}"   
                             />
        <WrapPanel Visibility="{Binding IsChgLS,ElementName=TV,Converter={StaticResource bv}}">
            <Button  Grid.Column="0"   Click="ChgLIEFNRCommand" Width="24" Height="20"  >
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/arrow-reload.png" />
                </Button.Background>
            </Button>
            <TextBlock Text="{Binding Source={Localization:Translate Word=变更供应商}}"/>
            <WrapPanel Visibility="{Binding IsNew,ElementName=TV,Converter={StaticResource bv}}">
                <LS:TSLS02 KEY="{Binding LIEFNR,ElementName=TV}"
                               ORDERNUM="{Binding LIEFNR,ElementName=TV}"
                               IsEdit="True"
                               />
                <TextBlock Text="{Binding Source={Localization:Translate Word=请选择供应商}}"/>
                <Button  Grid.Column="0"   Click="ChgLIEFNRCommand" Width="24" Height="20"  >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/button_ok.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
        </WrapPanel>

        <TextBlock Grid.Row="0" Grid.Column="0"  Text="{Binding EKKBUCHKRS}" Width="Auto" />
        <Grid Grid.Column="0"  Margin="5,0,0,0"  VerticalAlignment="Center" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock FontSize="14" Text="{Binding Source={Localization:Translate Word=类型:}}"/>
            <SD:K8884  Grid.Column="2" MaxWidth="60" FontSize="16"
                               Name="c84"
                                ORDERNUM="{Binding AUFART,ElementName=TV}"/>

        </Grid>
        <Grid Grid.Row="0"  Grid.Column="1" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" FontSize="16" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=采购单:}}" ></TextBlock>
            <TextBlock Grid.Column="1" Text="{Binding EKKAUFKRS}" FontSize="16"  Width="Auto" ></TextBlock>
            <TextBlock Grid.Column="2" Text="{Binding Source={Localization:Translate Word=-}}" FontSize="16" ></TextBlock>
            <TextBlock Grid.Column="3" Text="{Binding EKKAUFLFD,Converter={StaticResource pnum}}" FontSize="16"  Width="Auto" ></TextBlock>
        </Grid>
        <Grid Grid.Row="0"  Grid.Column="2" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" FontSize="16"  Text="{Binding Source={Localization:Translate Word=负责人:}}"></TextBlock>
            <HR:TSHR20 Grid.Column="1"  FontSize="16"
                              BENID="{Binding Path=SACHB,ElementName=TV}" 
                              ORDERNUM="{Binding Path=SACHB,ElementName=TV}" 
                              Width="Auto"/>
        </Grid>

        <Grid Grid.Row="0"  Grid.Column="3" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=订单总数量:}}"   FontSize="16"></TextBlock>
            <TextBlock Grid.Column="1" Text="{Binding EKKME1,Converter={StaticResource d100}}" FontSize="16"  Width="80" ></TextBlock>
        </Grid>
        <Grid Grid.Row="0"  Grid.Column="4" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=订单总金额:}}" ></TextBlock>
            <TextBlock Grid.Column="1" Text="{Binding EKKWE1}" FontSize="16" Width="80" ></TextBlock>
        </Grid>
        <Grid Grid.Row="0"  Grid.Column="5" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock   Grid.Column="0" FontSize="16"  Text="{Binding Source={Localization:Translate Word=币种:}}"></TextBlock>
            <SD:TSSD0149 Grid.Column="1" KEY="{Binding WAEHRSL,ElementName=TV}"  FontSize="16"
                            IsEdit="{Binding IsEdit,ElementName=TV}"
                             ORDERNUM="{Binding WAEHRSL,ElementName=TV}"
                              VALUE="{Binding KURS,ElementName=TV}"
                             MinWidth="60" />
            <TextBlock   Grid.Column="2" FontSize="16"  Text="{Binding Source={Localization:Translate Word=汇率:}}"></TextBlock>
            <ex:NumericBox Grid.Column="3" MaxLength="7"  FontSize="16"
                           DecimalPlaces="4"
                           KeyUp="KURS_KeyUp"
                           Text="{Binding KURS,ElementName=TV,Converter={StaticResource dw}}"
                           Width="80"/>
        </Grid>
        <TextBlock Grid.Row="0"  Grid.Column="6" Text="{Binding EKKADRZU}"  Width="Auto" />


        <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock   Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=海关编号:}}"></TextBlock>
            <ex:TXT72 Grid.Column="1" FontSize="16" Text="{Binding EKKAKKRED}"  MinWidth="100" MaxWidth="180" />
        </Grid>
        <Grid Margin="10,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=交易条件:}}"></TextBlock>
            <LD:TSLS05 Grid.Column="1" 
                            IsEdit="{Binding IsEdit,ElementName=TV}" 
                            LIEFNR="{Binding LIEFNR,ElementName=TV}"  
                            KEY="{Binding KONDSL,ElementName=TV}" />
        </Grid>
        <Grid Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock   Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=贸易方式:}}"></TextBlock>
            <SD:TSSD0241 Grid.Column="1"  FontSize="16"
                             KEY="{Binding LIEFBED,ElementName=TV}" 
                             IsEdit="{Binding IsEdit,ElementName=TV}" 
                             ORDERNUM="{Binding LIEFBED,ElementName=TV}"/>
            <ex:TXT72 Grid.Column="2" FontSize="16" Text="{Binding EKKRSTBEZ}"  Width="60" />
        </Grid>
        <Grid Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" VerticalAlignment="Center" Visibility="{Binding IsEdit,Converter={StaticResource ResourceKey= bv}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <VL:TSVL02  SART="{Binding SART,ElementName=TV}" FontSize="16"
                         KEY="{Binding VSPED,ElementName=TV}"   
                         ORDERNUM="{Binding VSPED,ElementName=TV}"   
                         IsEdit="{Binding IsEdit,ElementName=TV}"/>
        </Grid>
        <Grid Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" VerticalAlignment="Center" Visibility="{Binding IsEdit,Converter={StaticResource ResourceKey= nbv}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=运输方式:}}"></TextBlock>
                <TextBlock Grid.Column="1" FontSize="16" Text="{Binding SART,ElementName=TV,Converter={StaticResource gb2312}}" />
            </Grid>
            <Grid Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=承运人:}}"></TextBlock>
                <TextBlock FontSize="16" Text="{Binding VSPED,ElementName=TV,Converter={StaticResource gb2312}}" Grid.ColumnSpan="2" Margin="51,0,0.2,-0.4" />
            </Grid>
        </Grid>

        <Grid Grid.Row="1" Grid.Column="5" Grid.ColumnSpan="2" VerticalAlignment="Center" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" FontSize="16" Text="{Binding Source={Localization:Translate Word=付款方式:}}"></TextBlock>
            <ZA:TSZA02 Grid.Column="1" FontSize="16" KEY="{Binding ZAHLBED,ElementName=TV}"                          
                        ORDERNUM="{Binding ZAHLBED,ElementName=TV}"  
                        IsEdit="{Binding IsEdit,ElementName=TV}" />
        </Grid>

        <Grid Margin="10,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=供应商:}}"></TextBlock>
            <CheckBox Grid.Column="1" IsChecked="{Binding IsShowRight,ElementName=TV,Mode=OneWayToSource}"  
                          VerticalAlignment="Top"></CheckBox>
        </Grid>

        <Grid Margin="10,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=交易条件:}}"></TextBlock>
            <TextBlock Grid.Column="1" 
                       Text="{Binding EKKKONDSL,Converter={StaticResource gb2312}}"  
                       Width="100" />
        </Grid>

    </Grid>
</me:UIEKK>
